import React from 'react';
import styles from './index.less';

export default function FormHeader({ id, title, matterStatus, ...restProps }) {
    const statusArr = ['待开始 ', '进行中', '已完成'];

    return (
        <div className={styles.wrap} id={id} {...restProps}>
            {title}
            {matterStatus && (
                <span className={matterStatus === 3 ? styles.completed : styles.unfinished}>
                    {statusArr[matterStatus - 1]}
                </span>
            )}
        </div>
    );
}
